<?php
/**
 * Created by PhpStorm.
 * User: pengxu
 * Date: 2017/12/22
 * Time: 9:57
 */

Route::group(['middleware' => 'mobile.common.wechatShare'], function () {
    Route::get('index', 'IndexController@index')->name('index');

    Route::get('user/register', 'UserController@create')->name('user.create');
    Route::post('user/register', 'UserController@store')->name('user.store');
    Route::get('user/login', 'UserController@login')->name('user.login');
    Route::post('user/login', 'UserController@auth')->name('user.auth');

//快速申请，不需要登录
    Route::get('record/createFast', 'RecordController@createFast')->name('record.createFast');
    Route::post('record/storeFast', 'RecordController@storeFast')->name('record.storeFast');
    Route::get('record/success', 'RecordController@success')->name('record.success');

    Route::group(['middleware' => 'mobile.user.login'], function () {
        Route::get('record/createProfile', 'RecordController@createProfile')->name('record.createProfile');
        Route::post('record/storeProfile', 'RecordController@storeProfile')->name('record.storeProfile');
        Route::get('record/createAsset', 'RecordController@createAsset')->name('record.createAsset');
        Route::post('record/storeAsset', 'RecordController@storeAsset')->name('record.storeAsset');

        Route::get('user/logout', 'UserController@logout');
        Route::get('user/me', 'UserController@me')->name('user.me');
        Route::get('user/meSafe', 'UserController@meSafe')->name('user.meSafe');
        Route::get('user/editPassword', 'UserController@editPassword')->name('user.editPassword');
    });

});
